// OriginalProperty.h: interface for the OriginalProperty class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_ORIGINALPROPERTY_H__8517EB10_8B3F_4895_9464_A08D2299FA23__INCLUDED_)
#define AFX_ORIGINALPROPERTY_H__8517EB10_8B3F_4895_9464_A08D2299FA23__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "PropertyVariable.h"

namespace PropertySystem
{
	class DllExport OriginalProperty  
	{
	public:
		OriginalProperty();
		virtual ~OriginalProperty();
		
	public:
		const CString& PartID() const{
			return m_strPartID;
		}

		void PartID(const CString& strPartID){
			m_strPartID = strPartID;
		}

		const CString& PropertyName() const{
			return m_strPropertyName;
		}

		void PropertyName(const CString& strName){
			m_strPropertyName = strName;
		}

		void DataType(const CString& strType){
			m_strDataType = strType;
		}

		const CString& DataType() const{
			return m_strDataType;
		}

		void PropertyType(const CString& strType){
			m_strPropertyType = strType;
		}

		const CString& PropertyType() const{
			return m_strPropertyType;
		}

		void PropertyTable(const CString& strTable){
			m_strPropertyTable = strTable;
		}

		const CString& PropertyTable() const{
			return m_strPropertyTable;
		}

		void Default(const CString& strDefault){
			m_strDefault = strDefault;
		}

		const CString& Default() const{
			return m_strDefault;
		}

		void Unit(const CString& strUnit){
			m_strUnit = strUnit;
		}

		const CString& Unit() const{
			return m_strUnit;
		}

		void Prompt(const CString& strPrompt){
			m_strPrompt = strPrompt;
		}

		const CString& Prompt() const{
			return m_strPrompt;
		}

		void PromptSourceMode(const CString& strMode){
			m_strPromptSourceMode = strMode;
		}

		const CString& PromptSourceMode() const{
			return m_strPromptSourceMode;
		}

		void PromptSource(const CString& strSource){
			m_strPromptSource = strSource;
		}

		const CString& PromptSource() const{
			return m_strPromptSource;
		}

		void InputMode(const CString& strMode){
			m_strInputMode = strMode;
		}

		const CString& InputMode() const{
			return m_strInputMode;
		}

		void Influence(const CString& strInfluence){
			m_strInfluence = strInfluence;
		}

		const CString& Influence() const{
			return m_strInfluence;
		}

		void Description(const CString& strDesc){
			m_strDescription = strDesc;
		}

		const CString& Description() const{
			return m_strDescription;
		}

		void Customization(BOOL bCustom){
			m_bCustomization = bCustom;
		}

		BOOL Customization() const{
			return m_bCustomization;
		}

		void EffectField(const CString& strEffect){
			m_strEffectField = strEffect;
		}

		const CString& EffectField() const {
			return m_strEffectField;
		}

		void PropertyField(const CString& strField){
			m_strPropertyField = strField;
		}

		const CString& PropertyField() const {
			return m_strPropertyField;
		}

		const CString& EffectCondition() const {
			return m_strEffectCondition;
		}

		void EffectCondition(const CString& strCondition){
			m_strEffectCondition = strCondition;
		}

		const CString& ExistCondition() const {
			return m_strExistCondition;
		}

		void ExistCondition(const CString& strCondition) {
			m_strExistCondition = strCondition;
		}
 
		void Save(BOOL bIsSave){
			m_bIsSave = bIsSave;
		}

		BOOL Save() const {
			return m_bIsSave;
		}

		void ArrangePrior(INT nPrior){
			m_nPrior = nPrior;
		}

		INT ArrangePrior() const {
			return m_nPrior;
		}
		
		BOOL IsActive() const ;

		PropertyVariable* GenerateVariable() const ;

	private:
		PropertyVariable* GenerateVariableType(const OriginalProperty* pOProperty) const;
		void CopyPropertyData(PropertyVariable& variable, const OriginalProperty& oproperty) const;
		PropertyVariable::EFFECTFIELD GetEffectField(const CString& strField) const;
		Variable::VarType GetDataType(const CString& strDataType) const;

	private:
		CString m_strPartID;
		CString m_strPropertyName;
		CString m_strDataType;
		CString m_strPropertyType;
		CString m_strPropertyTable;
		CString m_strDefault;
		CString m_strUnit;
		CString m_strPrompt;
		CString m_strPromptSourceMode;
		CString m_strPromptSource;
		CString m_strInputMode;
		CString m_strInfluence;
		CString m_strDescription;
		BOOL m_bCustomization;
		CString m_strEffectField;
		CString m_strPropertyField;
		CString m_strEffectCondition; 
		CString m_strExistCondition;
		BOOL m_bIsSave;
		INT m_nPrior;
	};
};
#endif // !defined(AFX_ORIGINALPROPERTY_H__8517EB10_8B3F_4895_9464_A08D2299FA23__INCLUDED_)
